package com.xintonghua.bussiness.bean;

import android.text.TextUtils;

import com.google.zxing.common.StringUtils;

import java.util.Observable;
import java.util.Observer;

/**
 * Created by liqi on 2018/4/17.
 */

public class Time extends Observable {
    public String year;
    public String month;
    public String day;

    public String getTime() {
        return year + "-" + month + "-" + day;
    }

    // 时间都否为ongoing
    public boolean isEmptys() {
        if (TextUtils.isEmpty(year) || TextUtils.isEmpty(month) || TextUtils.isEmpty(day)) {
            return true;
        }
        return false;
    }


    public void setTime(String year, String month, String day) {
        this.year = year;
        this.month = month;
        this.day = day;
        setChanged();
        notifyObservers(this);
    }


    public String getYear() {
        return year;
    }

    public void setYear(String year) {
        this.year = year;
    }

    public String getMonth() {
        return month;
    }

    public void setMonth(String month) {
        this.month = month;
    }

    public String getDay() {
        return day;
    }

    public void setDay(String day) {
        this.day = day;
    }
}
